/** @file   target.h
    @author M. P. Hayes, UCECE
    @date   15 May 2007
    @brief  Target definitions
*/
#ifndef TARGET_H
#define TARGET_H

/** CPU clock frequency.  */
#define F_CPU 1000000


/** Buttons.  */
#define BUTTON1_PORT PORT_B
#define BUTTON1_BIT 3
#define BUTTON2_PORT PORT_B
#define BUTTON2_BIT 5


/** LED matrix columns.  */
#define LMATRIX_COLS 5
#define LMATRIX_COL5_PORT PORT_B
#define LMATRIX_COL5_BIT 0
#define LMATRIX_COL4_PORT PORT_B
#define LMATRIX_COL4_BIT 1
#define LMATRIX_COL3_PORT PORT_B
#define LMATRIX_COL3_BIT 2
#define LMATRIX_COL2_PORT PORT_C
#define LMATRIX_COL2_BIT 2
#define LMATRIX_COL1_PORT PORT_C
#define LMATRIX_COL1_BIT 3

/** LED matrix rows.  */
#define LMATRIX_ROWS 7
#define LMATRIX_ROWS_SWAP
#define LMATRIX_ROW_PORT PORT_D
#define LMATRIX_ROW_BIT_FIRST 1
#define LMATRIX_ROW_BIT_LAST 7


/** MOSFET.  */
#define MOSFET_PORT PORT_C
#define MOSFET_BIT 5


/** One wire bus.  */
#define U1WIRE_PORT PORT_C
#define U1WIRE_BIT 4

#endif
